﻿using Nemerle.Collections;
using Nemerle.Text;
using Nemerle.Utility;

using System;
using System.Collections.Generic;
using System.Linq;

namespace ExprParser
{
  public variant Token
  {
    | Operator       { Text : string; }
    | Expr           { Value : PExpr; }
    | Eof
    
    public override ToString() : string
    {
      match (this)
      {
        | Operator    (text)     => $"'$text'"
        | Expr        (value)    => value.ToString()
        | Eof                    => <#"EOF"#>
      }
    }
  }
}
